var t = getApp();

Page({
    data: {
        list: [],
        last_page: 1,
        page: 1,
        lf_id: ""
    },
    onLoad: function(t) {
        t.lf_id && this.setData({
            lf_id: t.lf_id
        }), this.getData();
    },
    getData: function() {
        var a = this;
        t._postNetWork({
            url: t.getNetAddresss("plugin.lawyer-platform.frontend.controllers.message.getLawyerList"),
            data: {
                id: this.data.lf_id
            },
            success: function(e) {
                e.data.result ? a.setData({
                    list: e.data.data.list.data,
                    last_page: e.data.data.list.last_page
                }) : t.tips(e.data.msg);
            }
        });
    },
    to: function(t) {
        var a = t.currentTarget.dataset.item;
        wx.navigateTo({
            url: "/packageI/lawyerPlatform/chat/chat?message_type=3&l_id=" + a.id
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {
        var a = this;
        if (this.data.page >= this.data.last_page) return !1;
        var e = {
            message_type: this.data.message_type
        };
        this.data.l_id && (e.l_id = this.data.l_id), t._postNetWork({
            url: t.getNetAddresss("plugin.lawyer-platform.frontend.controllers.message.getList"),
            data: e,
            success: function(t) {
                1 == t.data.result && (a.data.list = a.data.list.concat(t.data.data.list.data), 
                a.setData({
                    list: a.data.list,
                    page: t.data.data.list.current_page,
                    last_page: t.data.data.list.last_page
                }));
            }
        });
    },
    onShareAppMessage: function() {}
});